﻿using System;

namespace Lucene.Linq.Utility
{
    internal struct ActionDisposable : IDisposable
    {
        private readonly Action _action;

        public ActionDisposable(Action action)
        {
            _action = action;
        }

        #region IDisposable Members

        public void Dispose()
        {
            _action();
        }

        #endregion
    }
}